package org.example.ui;

import org.apache.ibatis.session.SqlSession;
import org.example.mapper.GradeMapper;
import org.example.util.MyBatisUtil;

public class DeleteGrades {
    public static void main(String[] args) {
        SqlSession sqlSession= MyBatisUtil.getSession();
        GradeMapper gradeMapper=sqlSession.getMapper(GradeMapper.class);
        Integer[] gids={9,10,11};
        int temp=gradeMapper.deleteByGids(gids);
        sqlSession.commit();
        sqlSession.close();
        if (temp>0){
            System.out.println("删除了"+temp+"条记录");
        }else {
            System.out.println("删除失败");
        }
    }
}
